package edu.itstudy.control;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import edu.itstudy.bean.User;
import edu.itstudy.services.IUserServices;
import edu.itstudy.services.impl.IUserServicesImpl;

public class LoginOutServlet extends HttpServlet {
	
private IUserServices iuserServices = new IUserServicesImpl();
	
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		/*
		 * 从session中删除用户登录信息
		 */
			request.getSession().removeAttribute("name");
			response.sendRedirect("index");
	}
}
